<template>
	<view >
		<!-- 头部 -->
		<view class="header">
			<view class="" style="display: flex;align-items: center;" @click="navRouter('/pages/register/personalData/personalData')">
				<view class="photo">
					
					<image :src="uesrinfor.avatar || '../../../static/img/detailsMsg/photo.png'" mode=""></image>
				</view>
				<view class="information">
					<view class="name"> 
						{{uesrinfor.userName}}
						<text>{{management}}</text>
					</view>
					<view class="company" v-if="uesrinfor.reviewStatus == 2">
						{{uesrinfor.companyName}}
					</view>
				</view>
			</view>
			<view class="" @click="navRouter('/pages/my/set/set')">
				<image class="imgs" src="../../../static/img/detailsMsg/setting.png" mode=""></image>
			</view>

		</view>
		<!-- 内容 -->
		<view class="boxs">
			<view class="" @click="navRouter('/pages/my/mymaintain/mymaintain',true)">
				<view class="contents borboot">
					<image class="imgs" src="../../../static/img/detailsMsg/maintains.png" mode=""></image>
					<view class="titles">
						<view class="f15">我的保养</view>
						<uni-icons type="arrowright"></uni-icons>
					</view>

				</view>  
			</view>
			<view class="" @click="navRouter('/pages/my/maintenanceWork/maintenanceWork',true)">
				<view class="contents borboot">
					<image class="imgs" src="../../../static/img/detailsMsg/services.png" mode=""></image>
					<view class="titles">
						<view class="f15">我的维修</view>
						<uni-icons type="arrowright"></uni-icons>
					</view>

				</view>
			</view>
			<view class="" @click="navRouter('/pages/my/rescue/rescue',true)">
				<view class="contents borboot">
					<image class="imgs" src="../../../static/img/detailsMsg/rescue.png" mode=""></image>
					<view class="titles">
						<view class="f15">我的救援</view>
						<uni-icons type="arrowright"></uni-icons>
					</view>
				</view>
			</view>
			
			<view class="" @click="navRouter('/pages/my/integral/integral',true)">
				<view class="contents borboot">
					<image class="imgs" src="../../../static/img/detailsMsg/integral.png" mode=""></image>
					<view class="titles">
						<view class="f15">我的积分</view>
						<uni-icons type="arrowright"></uni-icons>
					</view>
				</view>
			</view>
			
			<view class="" @click="shareBtn">
				<view class="contents borboot">
					<image class="imgs" src="../../../static/img/detailsMsg/share.png" mode=""></image>
					<view class="titles">
						<view class="f15">分享应用</view>
						<uni-icons type="arrowright"></uni-icons>
					</view>

				</view>
			</view>

			
			<view class="" @click="navRouter('/pages/my/feedback/feedback',true)">
				<view class="contents borboot">
					<image class="imgs" src="../../../static/img/detailsMsg/opinion.png" mode=""></image>
					<view class="titles">
						<view class="f15">意见反馈</view>
						<uni-icons type="arrowright"></uni-icons>
					</view>

				</view>
			</view>

			<!-- 客服 -->
			<view class="" @click="callst">
				<view class="contents ">
					<image class="imgs" src="../../../static/img/detailsMsg/call.png" mode=""></image>
					<view class="titles">
						<view class="f15">联系客服</view>
						<view class="co17">{{phone}}</view>
					</view>

				</view>
			</view>
		
		</view>
		
		
		<!-- 底部导航栏 -->
		<!-- #ifdef H5 -->
		<!-- <Tabber class="bottom" :select="select" /> -->
		<!-- #endif -->
	</view>
</template>

<script>
	import Tabber from "../../../components/bottom.vue"
	import toMaintain from "@/serve/api/toMaintain.js"
	import {
		mapGetters
	} from "vuex"
	export default {
		components: {
			Tabber
		},
		data() {
			return {
				select: 4,
				uesrinfor: '',
				management: '',
				phone: '400-8005-363',
			}
		},
		onLoad() {
			// uni.startSoterAuthentication({
			// 	requestAuthModes:['fingerPrint'],
			// 	authContent:"按指纹",
			// 	success(res){
			// 		console.log(res)
			// 	}
			// })

			this.user()
		}, 
		
		watch: {
			getUserInfo() {
				this.uesrinfor = this.getUserInfo
			}
		},
		computed: {
			...mapGetters([
				'getUserInfo',
			])
		},
		methods: {
			async user(e) {
				this.uesrinfor = this.getUserInfo
				if (this.getUserInfo.roles.length != 0) {
					this.management = this.getUserInfo.roles[0].roleName
				}
			},
			
			shareBtn(){
				this.tip("正在努力开发中")
				// let that = this;
				// const subNVue = uni.getSubNVueById('share')
				// console.log(subNVue)
				// subNVue.show('fade-in', 300, function() {});
				// uni.$on('page-popup', (data) => {
				// 	subNVue.hide('fade-out', 300)
				// 	uni.$off('page-popup')
				// 	that.navRouter(data) 
				// })
			},
			//拨打电话
			callst() {
				uni.makePhoneCall({
					phoneNumber: this.phone
				});
			},
			goregister() {
				uni.navigateTo({
					url: "/pages/register/personalData/personalData"
				})
			},

		}
	} 
</script>

<style scoped>
	page {
		background-color: #FFFFFF;
	}

	.f15 {
		font-size: 15px;
	}

	.boxs {
		width: 100%;
		padding: 0 24px;
		box-sizing: border-box;
		background-color: #FFFFFF !important;
	}

	.contents {
		display: flex;
		align-items: center;
		padding: 20px 0;
	}

	.borboot {
		border-bottom: 1px solid #E2E6EF;
	}

	.imgs {
		width: 16px;
		height: 16px;
	}

	.titles {
		display: flex;
		width: calc(100% - 30px);
		justify-content: space-between;
		align-items: center;
		margin-left: 10px;
	}

	.co17 {
		color: #017EFE;
	}

	.bottom {
		position: fixed;
		bottom: 0;
		z-index: 9999;
	}

	.header {
		background-image: url(../../../static/img/minebj.jpg);
		width: 100%;
		height: 360rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		padding: 0 20px;
		box-sizing: border-box;

	}

	.photo image {
		width: 70px;
		height: 70px;
		border-radius: 50%;
	}

	.information {
		margin-left: 30rpx;
		color: #FFFFFF;
	}

	.name {

		font-size: 36rpx;
	}

	.name text {
		font-size: 24rpx;
		color: #B4D9FF;
		margin-left: 25rpx;
	}

	.company {
		color: #B4D9FF;
		font-size: 30rpx;
	}
	.ShareBox{
		position: /* fixed;
		top: 50%;
		left: 50%;
		 */
	}


	.borIcon{
		width: 90rpx;
		height: 90rpx;
	}



</style>
